package com.chain.qs.modules.biz.entity;

import com.chain.qs.common.persistence.DataEntity;

public class Condition extends DataEntity<com.chain.qs.modules.biz.entity.Condition> {
    private static final long serialVersionUID = 1L;

    private String sgroupId;
    private String gitemId;
    private String timeBegin;
    private String timeEnd;
    private String typeId;
    private String typeKid;
    private String recordColumn;
    private String spare1;
    private String spare2;

    public static Condition getCondition(String sgroupId, String gitemId, String timeBegin, String timeEnd, String typeId, String recordColumn) {
        Condition condition = new Condition();
        if (sgroupId != null) {
            condition.setSgroupId(sgroupId);
        }
        if (gitemId != null) {
            condition.setGitemId(gitemId);
        }
        if (timeBegin != null && !timeBegin.equals("")) {
            condition.setTimeBegin(timeBegin);
        }
        if (timeEnd != null && !timeEnd.equals("")) {
            condition.setTimeEnd(timeEnd);
        }
        if (typeId != null && !typeId.equals("")) {
            condition.setTypeId(typeId);
        }
        if (recordColumn != null && !recordColumn.equals("")) {
            condition.setRecordColumn(recordColumn);
        }
        return condition;
    }

    public String getSgroupId() {
        return sgroupId;
    }

    public void setSgroupId(String sgroupId) {
        this.sgroupId = sgroupId;
    }

    public String getGitemId() {
        return gitemId;
    }

    public void setGitemId(String gitemId) {
        this.gitemId = gitemId;
    }

    public String getTimeBegin() {
        return timeBegin;
    }

    public void setTimeBegin(String timeBegin) {
        this.timeBegin = timeBegin;
    }

    public String getTimeEnd() {
        return timeEnd;
    }

    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getRecordColumn() {
        return recordColumn;
    }

    public void setRecordColumn(String recordColumn) {
        this.recordColumn = recordColumn;
    }

    public String getSpare1() {
        return spare1;
    }

    public void setSpare1(String spare1) {
        this.spare1 = spare1;
    }

    public String getSpare2() {
        return spare2;
    }

    public void setSpare2(String spare2) {
        this.spare2 = spare2;
    }

    public String getTypeKid() {
        return typeKid;
    }

    public void setTypeKid(String typeKid) {
        this.typeKid = typeKid;
    }
}
